<template>
	<!-- 搜索框-->
	<view class="search-cont">
		<view class="search">
			<image src="../../../static/img/search.png" mode="widthFix" class="search-img"></image>
			<input v-model="searchInfo" type="text" placeholder="搜索你感兴趣的~" @input="Search()"/>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				searchInfo:''
			}
		},
		methods:{
			Search(){
				// 子组件传值(func与父组件进行函数绑定)
				this.$emit('func',this.searchInfo)
			}
		}
	}
</script>

<style scoped>
	/* 搜索部分 */
	.search-img{
		margin: auto 0 auto 20rpx;
		width: 40rpx;
		height: 40rpx;
	}
	.search{
		height: 70rpx;
		line-height: 70rpx;
		width: 100%;
		display: flex;
		background: #eff3f4;
		border-radius: 10rpx;
	}
	.search input{
		height: 70rpx;
		line-height: 70rpx;
		width: 100%;
		/* font-size: 20rpx; */
		color: #666666;
	}
	.search-cont{
		display: flex;
		justify-content: space-between;
		height: 70rpx;
		align-items: center;
	}
</style>
